import java.sql.Connection;
import java.sql.DriverManager;

public class DB
{
    private final String URL = "jdbc:mysql://localhost:3306/introse";
    private final String user = "root";
    private final String pass = "root";


 //   private String SQLStatement;
    private Connection conn;

    public DB() {}

    public void connect()
    {
        try
        {
            //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            Class.forName("com.mysql.jdbc.Driver");
            conn = DriverManager.getConnection(URL, user, pass);
            
            System.out.println("Connected");
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

    public void disconnect()
    {
        try
        {
            conn.close();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

    public Connection getConn()
    {
        return conn;
    }
}